
export const localStorage = {
    // 赋值
    set(key:string, value:any) {
        window.localStorage.setItem(key,value)
    },
    // 取值
    get(key:string): any {
        const json = window.localStorage.getItem(key)
        return JSON.parse(json)
    },
    // 单个删除
    remove(key:string){
        window.localStorage.removeItem(key)
    },
    // 删除所有
    clear(){
        window.localStorage.clear()
    }
}